function validateForm()
	{
		var firstName = document.forms["registerform"]["fName"].value;
		var lastName = document.forms["registerform"]["lName"].value;
		var username = document.forms["registerform"]["username"].value;
		var password = document.forms["registerform"]["password"].value;
		var passwordconfirm = document.forms["registerform"]["passwordconfirm"].value;
		var email = document.forms["registerform"]["Email"].value;
		var birthyear = document.forms["registerform"]["bd_year"].value;
		var strAlert = new String();
		var d = new Date();
		var atpos = 0;
		var dotpos = 0;
		
		if(firstName == "" || firstName == null)
			strAlert = "First Name must be filled out. \n";
		if(lastName == "" || lastName == null)
		{
			strAlert += "Last name must be filled out. \n";
		}
		if(username == "" || username == null)
		{
			strAlert += "UserName must be filled out. \n";
		}
		if(password == "" || password == null)
		{
			strAlert += "Password must be filled out. \n";
		}
		if(passwordconfirm == "" || passwordconfirm == null || passwordconfirm != password)
		{
			strAlert += "Both passwords must match. \n";
		}
		if(email == "" || email == null)
		{
			strAlert += "Email must be filled out. \n";
		}
		else
		{
			atpos=email.indexOf("@");
			dotpos=email.lastIndexOf(".");
			if(atpos<1 || dotpos<atpos+2 || dotpos+2>=email.length)
				strAlert += "Not a valid e-mail address \n";
			
		}
		if(birthyear=="" || birthyear==null || birthyear > d.getFullYear() || birthyear < (d.getFullYear() - 120))
		{
			strAlert += "Bithday's year is invalid. ";
		}

		if (strAlert == null || strAlert == "")
		{
			return true;
		}
		else
		{
			alert(strAlert);
			return false;
		}
	
	}